package com.gzhryc.shared_device.oem.code.config.dao.db;

import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.shared_device.oem.code.config.dao.enums.AppResourcePreloadEnum;

import java.util.Date;

/**
 * 应用预加载
 * @version 2023-10-04
 */
@Table(name="config_app_resource_preload")
public class AppResourcePreload {

    @Id(autoIncrement = 1000)
    @Column
    protected Long id;

    @Column(notNull = true,note="资源名称")
    protected String name;

    @Column(name = "app_id",notNull = true,note = "应用ID")
    protected String appId;

    @Column(notNull = true,defVal = "1",note = "资源类型")
    protected Integer type;

    @Column(notNull = true,length = 255,note = "预加载资源路径")
    protected String path;

    @Column(name = "update_date", autoUpdateTime = true)
    protected Date updateDate;

    @Column(name = "create_date")
    protected Date createDate;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getTypeName(){
        return AppResourcePreloadEnum.Type.note(this.type);
    }

}

